package com.billsharing.server;

import java.sql.Connection;
import java.sql.DriverManager;

public class DbConnect {

	Connection conn;

	Connection getConnection() {
		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			conn = DriverManager.getConnection(
					"jdbc:mysql://csdb.csc.villanova.edu/auppalap", "auppalap",
					"fL00355727");

		} catch (Exception e) {
			System.out.println(e);

		}

		return conn;
	}

	void close() {
		if (conn != null) {
			try {

				conn.close();

			} catch (Exception e) { /* ignore close errors */
			}
		}

	}

}
